<template>
  <el-container class="setUp">
    <div class="cs">
      <i class="el-icon el-icon-arrow-left" v-show="show1" @click="showCont"></i>
      <i class="el-icon el-icon-arrow-right" v-show="show2" @click="showCont"></i>
    </div>
    <el-aside width="340px" v-show="show3">
      <user-information :systemName="systemName"></user-information>
      <el-col>
        <el-menu
          unique-opened
          class="el-menu-vertical-demo"
          text-color="#fff"
          active-text-color="#09daba"
        >
          <el-submenu index="1">
            <template slot="title">
              <span>智慧路灯管理系统</span>
            </template>
            <el-menu-item-group>
              <ul class="router">
                <router-link to="/LampEquipmentLibrary" tag="li">
                  <a>设备管理</a>
                </router-link>
                <router-link to="/lampGroupmanagement" tag="li">
                  <a>分组管理</a>
                </router-link>
                <router-link to="/lampStrategy" tag="li">
                  <a>策略管理</a>
                </router-link>
                <router-link to="/lampScene" tag="li">
                  <a>场景管理</a>
                </router-link>
              </ul>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <span>夜景照明管理系统</span>
            </template>
            <el-menu-item-group>
              <ul class="router">
                <router-link to="/EquipmentLibrary" tag="li">
                  <a>设备管理</a>
                </router-link>
                <router-link to="/groupmanagement" tag="li">
                  <a>分组管理</a>
                </router-link>
                <router-link to="/ElectricBoxStrategy" tag="li">
                  <a>策略管理</a>
                </router-link>
                <router-link to="/scene" tag="li">
                  <a>场景管理</a>
                </router-link>
              </ul>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <span>系统设置</span>
            </template>
            <el-menu-item-group>
              <ul class="router">
                <router-link to="/userManagement" tag="li">
                  <a>用户管理</a>
                </router-link>
                <router-link to="/Journal" tag="li">
                  <a>系统日志</a>
                </router-link>
              </ul>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <span>充电桩系统设置系统</span>
            </template>
            <el-menu-item-group>
              <ul class="router">
                <router-link to="/BillManagement" tag="li">
                  <a>账单管理</a>
                </router-link>
                <router-link to="/ChargingPileSystem" tag="li">
                  <a>系统设置</a>
                </router-link>
                <router-link to="/ChargingPileUser" tag="li">
                  <a>用户管理</a>
                </router-link>
              </ul>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="5">
            <template slot="title">
              <span>广播对讲系统</span>
            </template>
            <el-menu-item-group>
              <ul class="router">
                <router-link to="/BroadcastingEquipment" tag="li">
                  <a>设备管理</a>
                </router-link>
                <router-link to="/BroadcastingGroup" tag="li">
                  <a>分组管理</a>
                </router-link>
                <router-link to="/SoundStrategy" tag="li">
                  <a>策略管理</a>
                </router-link>
                <router-link to="/BroadcastingScene" tag="li">
                  <a>场景管理</a>
                </router-link>
                <router-link to="/MediaResourceManagement" tag="li">
                  <a>媒体资源管理</a>
                </router-link>
              </ul>
            </el-menu-item-group>
          </el-submenu>
          <el-button @click="server_jump">设备管理服务</el-button>
        </el-menu>
      </el-col>
    </el-aside>
    <el-container class="body">
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>
<script>
import userInformation from "../../components/UserInformation";
export default {
  props: ["systemName"],
  data() {
    return {
      show1: true,
      show2: false,
      show3: true,
      device: true,
      ScenariOmanagement: false,
      PersonalInformation: "", //个人信息
    };
  },
  components: {
    userInformation,
  },
  methods: {
    showCont() {
      this.show1 = !this.show1;
      this.show2 = !this.show2;
      this.show3 = !this.show3;
    },
    server_jump() {
      this.$router.push("/serverJump");
    },
  },
  mounted() {
    // this.userName();
  },
};
</script>
<style scoped>
.body {
  min-width: 1300px;
  height: 100%;
  background: url("../../assets/image/strategy_add.jpg");
}
/deep/.el-col-24 {
  /* height: 100%; */
  box-sizing: border-box;
}
/deep/ .el-menu {
  width: 230px;
  /* height: 100%; */
  background: none;
  border: none;
  margin: 0 auto;
}
/deep/ .el-submenu {
  margin-bottom: 20px;
  border-radius: 12px;
}

/deep/ .el-menu--inline {
  background-color: rgba(0, 0, 0, 0.3);
}
/deep/ .el-submenu__title {
  height: 37px;
  line-height: 37px;
  background-color: #09daba;
  border-radius: 12px;
  text-align: center;
}
/deep/ .el-menu-item-group > ul {
  padding: 20px;
}
/deep/ .el-submenu .el-menu-item {
  height: 37px;
  line-height: 37px;
  background-color: rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
  min-width: 180px;
}
/deep/ .el-submenu__title i {
  color: #fff;
}
.router li {
  height: 30px;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
  line-height: 30px;
  text-align: center;
}
.router li a {
  color: #fff;
}
.router .router-link-exact-active {
  background-color: #09daba;
  color: #fff;
}
.setUp {
  height: 100%;
  background: url("../../assets/image/sidebar.jpg");
}
.setUp .cs .el-icon {
  position: absolute;
  top: 49%;
  left: 10px;
  z-index: 9;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  color: #fff;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.3);
}
.setUp .btns {
  margin: 30px 0 0 50px;
  width: 240px;
}
.setUp .btns button {
  width: 240px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  margin: 0 0 20px 0;
  border-radius: 5px;
  color: #fff;
  border: none;
  background: #26aea1;
}
/deep/ .btns .el-collapse-item__header > .el-collapse-item__arrow {
  line-height: 40px;
}
/deep/ .btns .el-collapse-item__content {
  padding-bottom: 0;
}
.el-main {
  padding: 0;
}
.el-header {
  padding: 0;
  background-color: #ccc;
}
.el-aside {
  width: 340px;
  padding-top: 40px;
}
.el-menu .el-button {
  width: 100%;
  background-color: #09daba;
  color: #fff;
  border: none;
  border-radius: 12px;
}
</style>
